package com.yeshine.opendata.api;

import com.yeshine.opendata.utils.JsonUtil;

/**
 * Created by taohj on 2014/9/19.
 *
 * API 操作 返回模板
 */
public class Result {


    private String message="";


    //操作结果
    private int status;


    //操作结果信息
    private Object result=new Object();

    public Result() {
    }

    public Result(String message, Object result) {
        this.message = message;
        this.result = result;
        this.status=0;
    }

    public Result(String message) {
        this.message = message;
        this.status=0;
    }

    public Result(Object result) {
        this.result = result;
        this.status=0;
    }

    public Result(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public Result(String message, int status, Object result) {
        this.message = message;
        this.status = status;
        this.result = result;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }


    @Override
    public String toString() {
        return JsonUtil.toString(this);
    }
}
